#pragma once
#include <Windows.h>
#include "imgui.h"
#include "imgui_impl_win32.h"
#include "imgui_impl_dx11.h"
#include <thread>
#include <filesystem>

extern ID3D11Device* g_pd3dDevice;
extern ImFont* font;
extern ImFont* font_E;

bool IconTextButton(const char* label, ImTextureID texture, const ImVec2& imageSize,
    const ImVec2& buttonSize, bool isActive,
    const ImVec4& activeColor, const ImVec4& normalColor);



void CloseAllPopupWindows();

namespace Menu {
    inline bool menu_open = true;
    inline static ImVec2 windowSize = ImVec2(0, 0);
    void Screenui();
    void RenderViolencePage();
    void RenderLegalePage();
    void RenderVisualPage();
    void RenderSkinPage();
    void RenderSettingsPage();
    void RenderEmptyPage();
}
namespace fs = std::filesystem;
class MenuAnimationManager {
public:
    static void UpdateAnimation(bool menuOpen, float deltaTime);
    static float GetAlpha();
    static void ResetAnimation(bool menuOpen);

private:
    static inline float s_alphaAnim = 0.0f;
    static inline bool s_lastMenuState = false;
};